import Vue from 'vue'
import ElementUI from 'element-ui'
import VueRouter from 'vue-router'
import 'element-ui/lib/theme-default/index.css'
import Vuex from 'vuex'
import _ from 'lodash';


import './element-ui.js'

import routes from './routeConfig.js'
import App from './App.vue'
import filters from './filters/index.js'



Object.keys(filters).forEach(key => Vue.filter(key, filters[key]))
Vue.use(ElementUI);
Vue.use(VueRouter);
Vue.use(Vuex);

const router = new VueRouter({
    mode: 'history', //切换路径模式，变成history模式
    scrollBehavior: () => ({ y: 0 }), // 滚动条滚动的行为，不加这个默认就会记忆原来滚动条的位置
    routes
});

new Vue({
    el: '#app',
    render: h => h(App),
    router
});
